<?php
    require_once("site/class/utility.php");

	$type = array('announcement','business');
	foreach($type as $a)
	{
	?>
    	<div id="<?php echo $a;?>" class="highlight">
        <h3 align="center"><a href="/bizbuddy.com/<?php echo $a;?>-0.all.php"><?php echo ucwords($a);?> Highlights</a></h3><br />
            <?php
            $posts = utility::getPosts($a);
            $i = 0;
            foreach($posts as $post)
            {
                ?>
                <div class="highlights">
                    <img class="thumbnail" src="<?php echo $post['image'];?>" >
                    <h3 id="title"><a href="<?php echo $post['urls'].$post['id'].'-'.str_replace(' ','_',$post['name']).'.php';?>"><?php echo $post['name'];?></a></h3>
                    <p class="description"><?php echo substr($post['description'],0,150).'...';?></p>
                </div>
                <?php
				//if(++$i == 3)
					//break;
            }
            ?>
        </div>
    <?php
	}
?>